<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body>
	<ui:composition template="templates/common.xhtml">
		<ui:define name="content">
			<p:dataTable id="radioDT" var="kategori"
				value="#{kategoriBean.kategoris}"
				selection="#{kategoriBean.selectedKategori}" rowKey="#{kategori.id}">
				<p:column selectionMode="single"
					style="width:16px;text-align:center" />
				<p:column headerText="Kategori Ad">
					<h:outputText value="#{kategori.ad}" />
				</p:column>
				<p:column headerText="Üst Kategori Ad">
					<h:outputText value="#{kategori.eticKategori.ad}" />
				</p:column>
				<p:column headerText="Kategori Sıra">
					<h:outputText value="#{kategori.sira}" />
				</p:column>
			</p:dataTable>

			<br />
			<p:commandButton value="Sil"
				action="#{kategoriBean.deleteKategori()}" update="radioDT" />
			<p:commandButton value="Güncelle"
				action="#{kategoriBean.updateKategori()}" />
<!-- 			<h:commandButton value="Ekle" action="#{kategoriBean.addKategori()}" -->
<!-- 				onclick="this.form.target='_blank'" /> -->
<!-- 			<h:commandLink action="#{kategoriBean.addKategori()}" target="_blank" -->
<!-- 				value="asda" /> -->
		</ui:define>
	</ui:composition>
</h:body>
</html>
